package com.rimi.controller;

import com.rimi.bean.Menu;
import com.rimi.service.MenuService;
import com.rimi.service.MenuTimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("searchpage")
public class SearchPageController {
    @Autowired
    private MenuService menuService;

    @RequestMapping("index")
    public String getMenuList(Model model){
        //把导航菜单列表存入Menu
        List<Menu> menuList = menuService.getMenuList();
        model.addAttribute("Menu", menuList);
        return "search_page";
    }

}
